<extend name="Console:index"/>
<block name="main">
    <script src="__PUBLIC__/js/access.js"></script>
    <div>
        <ol class="breadcrumb">
            <li class="active">权限管理</li>
            <li class="active">权限分配</li>
        </ol>
    </div>
    <div>
        <span><span style="color: red">{$role.name}</span>  欢迎您！正在为你
            <empty name="nodeList">
                <span style="color:red">第一次分配</span>
                <else/>
                <span style="color:red">修改</span></empty>操作权限。</span>
        <form action="{:U('Access/addAccess')}" method="post">
            <input name="rid" type="hidden" value="{$role.id}"/>
        <ul>
        <volist name="nodeData" id="n">
           <li>
               <input type="checkbox" name="access[]"  value="{$n.id},{$n.level}" <in name="n.id" value="$nodeList">checked</in> />{$n.title}
               <volist name="n.controller" id="c">
                   <ul>
                       <li>
                           <input type="checkbox" name="access[]"  value="{$c.id},{$c.level}"  <in name="c.id" value="$nodeList">checked</in> />{$c.title}
                           <ul>
                               <volist name="c.action" id="a">
                                   <li>
                                       <input type="checkbox" name="access[]"  value="{$a.id},{$a.level}"  <in name="a.id" value="$nodeList">checked</in> />{$a.title}
                                   </li>
                               </volist>
                           </ul>
                       </li>
                   </ul>
               </volist>
           </li>
        </volist>
        </ul>
            <input type="submit" class="btn btn-success" value="保存"/>
        </form>
    </div>

</block>